package com.dundun.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName internship
 */
@TableName(value ="internship")
@Data
public class Internship implements Serializable {
    /**
     * 岗位id
     */
    @TableId(type = IdType.AUTO)
    private Long internshipId;

    /**
     * 发布者id
     */
    private Long userId;

    /**
     * 岗位名称
     */
    private String internshipName;

    /**
     * 公司名称
     */
    private String companyName;

    /**
     * 岗位图片
     */
    private String internshipLogo;

    /**
     *  岗位类型
     */
    private String type;

    /**
     * 实习地点
     */
    private String city;

    /**
     * 实习详细地址
     */
    private String location;

    /**
     * 发布时间
     */
    private Date publishTime;

    /**
     * 是否可远程（1-可远程 0-不可远程）
     */
    private Integer remoteFlag;

    /**
     * 是否可转正（1-可转正 0-不可转正）
     */
    private Integer hireFlag;

    /**
     * 浏览量
     */
    private Long browsedNum;

    /**
     * 被收藏数
     */
    private Long collectedNum;

    /**
     * 已投递简历数
     */
    private Long deliveredNum;

    /**
     * 岗位详情
     */
    private String detail;

    /**
     * 简历格式
     */
    private String resumeFormat;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Internship other = (Internship) that;
        return (this.getInternshipId() == null ? other.getInternshipId() == null : this.getInternshipId().equals(other.getInternshipId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getInternshipName() == null ? other.getInternshipName() == null : this.getInternshipName().equals(other.getInternshipName()))
            && (this.getCompanyName() == null ? other.getCompanyName() == null : this.getCompanyName().equals(other.getCompanyName()))
            && (this.getInternshipLogo() == null ? other.getInternshipLogo() == null : this.getInternshipLogo().equals(other.getInternshipLogo()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getCity() == null ? other.getCity() == null : this.getCity().equals(other.getCity()))
            && (this.getLocation() == null ? other.getLocation() == null : this.getLocation().equals(other.getLocation()))
            && (this.getPublishTime() == null ? other.getPublishTime() == null : this.getPublishTime().equals(other.getPublishTime()))
            && (this.getRemoteFlag() == null ? other.getRemoteFlag() == null : this.getRemoteFlag().equals(other.getRemoteFlag()))
            && (this.getHireFlag() == null ? other.getHireFlag() == null : this.getHireFlag().equals(other.getHireFlag()))
            && (this.getBrowsedNum() == null ? other.getBrowsedNum() == null : this.getBrowsedNum().equals(other.getBrowsedNum()))
            && (this.getCollectedNum() == null ? other.getCollectedNum() == null : this.getCollectedNum().equals(other.getCollectedNum()))
            && (this.getDeliveredNum() == null ? other.getDeliveredNum() == null : this.getDeliveredNum().equals(other.getDeliveredNum()))
            && (this.getDetail() == null ? other.getDetail() == null : this.getDetail().equals(other.getDetail()))
            && (this.getResumeFormat() == null ? other.getResumeFormat() == null : this.getResumeFormat().equals(other.getResumeFormat()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getInternshipId() == null) ? 0 : getInternshipId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getInternshipName() == null) ? 0 : getInternshipName().hashCode());
        result = prime * result + ((getCompanyName() == null) ? 0 : getCompanyName().hashCode());
        result = prime * result + ((getInternshipLogo() == null) ? 0 : getInternshipLogo().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getCity() == null) ? 0 : getCity().hashCode());
        result = prime * result + ((getLocation() == null) ? 0 : getLocation().hashCode());
        result = prime * result + ((getPublishTime() == null) ? 0 : getPublishTime().hashCode());
        result = prime * result + ((getRemoteFlag() == null) ? 0 : getRemoteFlag().hashCode());
        result = prime * result + ((getHireFlag() == null) ? 0 : getHireFlag().hashCode());
        result = prime * result + ((getBrowsedNum() == null) ? 0 : getBrowsedNum().hashCode());
        result = prime * result + ((getCollectedNum() == null) ? 0 : getCollectedNum().hashCode());
        result = prime * result + ((getDeliveredNum() == null) ? 0 : getDeliveredNum().hashCode());
        result = prime * result + ((getDetail() == null) ? 0 : getDetail().hashCode());
        result = prime * result + ((getResumeFormat() == null) ? 0 : getResumeFormat().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", internshipId=").append(internshipId);
        sb.append(", userId=").append(userId);
        sb.append(", internshipName=").append(internshipName);
        sb.append(", companyName=").append(companyName);
        sb.append(", internshipLogo=").append(internshipLogo);
        sb.append(", type=").append(type);
        sb.append(", city=").append(city);
        sb.append(", location=").append(location);
        sb.append(", publishTime=").append(publishTime);
        sb.append(", remoteFlag=").append(remoteFlag);
        sb.append(", hireFlag=").append(hireFlag);
        sb.append(", browsedNum=").append(browsedNum);
        sb.append(", collectedNum=").append(collectedNum);
        sb.append(", deliveredNum=").append(deliveredNum);
        sb.append(", detail=").append(detail);
        sb.append(", resumeFormat=").append(resumeFormat);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}